package com.slz3.business.module.configManagement.conShareManage.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conShareManage.domain.ConShareManage;
import com.slz3.business.module.configManagement.conShareManage.domain.ConShareManageCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class ConShareManageResAtomic {


    public Mono<ServerResponse> add_$ConShareManageUpdateLock(ServerRequest req, ConShareManage conShareManage) {
        return ConShareManageResSafeValid.add(req, conShareManage) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.add(req, conShareManage);
    }

    public Mono<ServerResponse> delete_$ConShareManageUpdateLock(ServerRequest req, ConShareManageCondition conShareManageCondition) {
        return ConShareManageResSafeValid.delete(req, conShareManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$ConShareManageUpdateLock(ServerRequest req, ConShareManage conShareManage) {
        return ConShareManageResSafeValid.modify(req, conShareManage) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.modify(req, conShareManage);
    }

    public Mono<ServerResponse> info_$ConShareManageUpdateLock(ServerRequest req) {
        return ConShareManageResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$ConShareManageUpdateLock(ServerRequest req, ConShareManageCondition conShareManageCondition) {
        return ConShareManageResSafeValid.auditSubmit(req, conShareManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$ConShareManageUpdateLock(ServerRequest req, ConShareManageCondition conShareManageCondition) {
        return ConShareManageResSafeValid.audit(req, conShareManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$ConShareManageUpdateLock(ServerRequest req, ConShareManageCondition conShareManageCondition) {
        return ConShareManageResSafeValid.auditReject(req, conShareManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$ConShareManageUpdateLock(ServerRequest req, ConShareManageCondition conShareManageCondition) {
        return ConShareManageResSafeValid.usingEnable(req, conShareManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$ConShareManageUpdateLock(ServerRequest req, ConShareManageCondition conShareManageCondition) {
        return ConShareManageResSafeValid.usingDisable(req, conShareManageCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConShareManageResExecutor.usingDisable(req);
    }
}
